<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

Route::group([
    'prefix' => 'admin/pointShop',
    'namespace' => 'Frieza\\Modules\\PointShop\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    //商品列表
    $router->get('/', 'GoodsBaseInfoController@index');
    $router->put('/{goods_id}', 'GoodsBaseInfoController@changeAttr');
    $router->get('create', 'GoodsBaseInfoController@create');
    $router->get('edit/{goods_id}', 'GoodsBaseInfoController@create');
    $router->post('operation/{goods_id}', 'GoodsBaseInfoController@operation');
    $router->post('save', 'GoodsBaseInfoController@save');
    $router->get('/downTemplate', 'GoodsBaseInfoController@downTemplate');//兑换码模板下载
    //订单列表
    $router->get('/order', 'PointOrderController@index');
    $router->get('/order/downExcel', 'PointOrderController@downExcel');
    $router->get('/order/downExcelModel', 'PointOrderController@downExcelModel');
    $router->get('/order/importExcel', 'PointOrderController@importExcel');
    $router->get('/order/area', 'PointOrderController@area')->name('order.area');
    $router->post('/order/saveExcel', 'PointOrderController@saveExcel');
    $router->get('/addExpress/{id}', 'PointOrderController@addExpress');
    $router->get('/address/{id}', 'PointOrderController@address');
    $router->get('/edit', 'PointOrderController@edit');
    $router->get('/order/edit', 'PointOrderController@edit');
    $router->post('/express/save', 'PointOrderController@saveAddress');
    $router->post('/order/save', 'PointOrderController@save');
    $router->post('/changeOrderInfo', 'PointOrderController@changeOrderInfo');//订单调整为关闭
});